Generating Minimal Perfect Hash Functions
نویسنده
چکیده
The randomized, deterministic and parallel algorithms for generating minimal perfect hash functions (MPHF) are proposed. Given a set of keys, W, which are character strings over some alphabet, the algorithms using a three-step approach (mapping, ordering, searching) nd the MPHF of the form h(w) = (h0(w) + g(h1(w)) + g(h2(w)))mod m, w 2 W, where h0, h1, h2 are auxiliary pseudorandom functions, m is a number of input keys, and g is a function implemented as a lookup table. The randomized and deterministic algorithms are time optimal, i.e. they construct the MPHF | of relatively large representation space | in expected time O(m). The time complexity of the parallel algorithm is exponential in m, but it generates the space eecient MPHF. The algorithm which is based on a specially devised data structure, called a reversed trie, exhibits a consistent and almost linear speedup in the number of processors on a message-based distributed-memory computer. The results of timing experiments conducted on the implementations of the algorithms are presented.
منابع مشابه
A New Algorithm for Constructing Minimal Perfect Hash Functions
We present a three-step algorithm for generating minimal perfect hash functions which runs very fast in practice. The first step is probabilistic and involves the generation of random graphs. The second step determines the order in which hash values are assigned to keys. The third step assigns hash values to the keys. We give strong evidences that first step takes linear random time and the sec...
متن کاملAn Optimal Algorithm for Generating Minimal Perfect Hash Functions
A new algorithm for generating order preserving minimal perfect hash functions is presented. The algorithm is probabilistic, involving generation of random graphs. It uses expected linear time and requires a linear number words to represent the hash function, and thus is optimal up to constant factors. It runs very fast in practice.
متن کاملA Family of Perfect Hashing Methods
Minimal perfect hash functions are used for memory efficient storage and fast retrieval of items from static sets. We present an infinite family of efficient and practical algorithms for generating order preserving minimal perfect hash functions. We show that almost all members of the family construct space and time optimal order preserving minimal perfect hash functions, and we identify the on...
متن کاملA Simulated Annealing Algorithm for Generating Minimal Perfect Hash Functions
We developed minimal perfect hash functions for a variety of datasets using the probabilistic process of simulated annealing (SA). The SA solution structure is a tree representing an annealed program (algorithm). This solution structure is similar to the structure used in genetic programming. When executed, the SA program produces multiple hash functions for the given data set. An initial hash ...
متن کاملGraphs, Hypergraphs and Hashing
Minimal perfect hash functions are used for memory efficient storage and fast retrieval of items from static sets. We present an infinite family of efficient and practical algorithms for generating minimal perfect hash functions which allow an arbitrary order to be specified for the keys. We show that almost all members of the family are space and time optimal, and we identify the one with mini...
متن کامل